@{extends '../../templates/@layout.phtml'}

@{block #custom_head}
<link rel="stylesheet" media="screen,projection,tv" href="{$basePath}/systemApps/celebriotv/default.css" type="text/css" />
<script type="text/javascript" src="{$basePath}/js/apps/jquery-ajax.js"></script>
<img src="{$basePath}/images/spinner_150.gif" class="invisible" />
@{/block}

@{block #main_content}
<script type="text/javascript">
    $(document).ready(function(){
	if (typeof document.body.onselectstart!="undefined")
	    document.body.onselectstart=function(){ return false }
	else if (typeof document.body.style.MozUserSelect!="undefined")
	    document.body.style.MozUserSelect="none";
	$(document.body).bind("contextmenu", function(e) {
            e.preventDefault();
	    return false;
        });
    });
    
    function celebriotvappLink(owner,url) {
        $("#celebriotvapp_menu li").width(300);
        $(owner).width(310);
        $.getJSON(url, {}, function (payload) {
            $("#celebriotvapp_contents").html(payload.snippets["snippet--celebriotvappSnippet"]);   
    	}).error(function (xhr, error, et) {
            console.log(et);
        });
    	$("#celebriotvapp_contents").html('<img src="{!$basePath}/images/spinner_150.gif" alt="{!_"Loading"}" class="spinner150" />');
    	return false;
    }
</script>

<div class="celebriotvapp" id="celebriotvapp">
    <div id="celebriotvapp_menu">
	<ul>
	    <li onmousedown="celebriotvappLink(this,{link Default:home});" onclick="return false;"><a href="{link Default:default}" title="{!_'Home'}"><strong>{!_"Home"}</strong></a></li>
	    <li onmousedown="celebriotvappLink(this,{link Default:ct1});" onclick="return false;"><a href="{link Default:ct1}" title="ČT1"><img src="{!$basePath}/systemApps/celebriotv/images/ct1.png" /><strong>ČT1</strong></a></li>
	    <li onmousedown="celebriotvappLink(this,{link Default:ct2});" onclick="return false;"><a href="{link Default:ct2}" title="ČT2"><img src="{!$basePath}/systemApps/celebriotv/images/ct2.png" /><strong>ČT2</strong></a></li>
	    <li onmousedown="celebriotvappLink(this,{link Default:ct24});" onclick="return false;"><a href="{link Default:ct24}" title="ČT24"><img src="{!$basePath}/systemApps/celebriotv/images/ct24.gif" /><strong>ČT24</strong></a></li>
	    <li onmousedown="celebriotvappLink(this,{link Default:ct4});" onclick="return false;"><a href="{link Default:ct4}" title="ČT4"><img src="{!$basePath}/systemApps/celebriotv/images/ct4.gif" /><strong>ČT4</strong></a></li>
            <li onmousedown="celebriotvappLink(this,{link Default:ockotv});" onclick="return false;"><a href="{link Default:chatwindow,'userid'=>2}" title="ockoTV"><strong>Óčko TV</strong></a></li>
            <!--{*
            <li onmousedown="celebriotvappLink(this,{link Default:cbnnews});" onclick="return false;"><a href="{link Default:cbnnews}" title="CBN_News"><strong>CBN News</strong></a></li>
            <li onmousedown="celebriotvappLink(this,{link Default:cspan1});" onclick="return false;"><a href="{link Default:cspan1}" title="cspan1"><strong>C-SPAN 1</strong></a></li>
            <li onmousedown="celebriotvappLink(this,{link Default:cspan2});" onclick="return false;"><a href="{link Default:cspan2}" title="cspan2"><strong>C-SPAN 2</strong></a></li>
            
            <li onmousedown="celebriotvappLink(this,{link Default:deluxemusic});" onclick="return false;"><a href="{link Default:ockotv}" title="deluxe_music"><strong>Deluxe Music</strong></a></li>
            
            <li onmousedown="celebriotvappLink(this,{link Default:bloombergTV});" onclick="return false;"><a href="{link Default:bloombergTV}" title="BloombergTV"><strong>Bloomberg TV</strong></a></li>
            <li onmousedown="celebriotvappLink(this,{link Default:churchTV});" onclick="return false;"><a href="{link Default:churchTV}" title="ChurchTV"><strong>Church TV</strong></a></li>
            <li onmousedown="celebriotvappLink(this,{link Default:nasaTV});" onclick="return false;"><a href="{link Default:nasaTV}" title="NasaTV"><strong>Nasa TV</strong></a></li>
            *}-->
	</ul>
    </div>
    <div id="celebriotvapp_body">
	<div id="celebriotvapp_contents"><div id="celebriotvapp_contents2">
	{snippet celebriotvappSnippet}
        {block #content}{/block}
	{/snippet}
	</div></div>
    </div>
</div>
@{/block}